<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>自主招生报名</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name="apple-mobile-web-app-status-bar-style" content="default"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta name="format-detection" content="telephone=no"/>
    <link href="${s.base}/mobile/css/weui.min.css" rel="stylesheet" />
    <link href="${s.base}/mobile/css/jquery-weui.css" rel="stylesheet"/>
    <link href="${s.base}/mobile/css/jquery-weui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="${s.base}/mobile/css/enrollment/zzzs.css"/>
</head>
<body>
<div class="main-content75">
    <div class="progress-cx-top">
        <div class="progress-cx-ctn">
            <div class="progress-cx-btn-ctn">
                <input id="input-card-num" placeholder="请输入身份证号查询报名进度" />
            </div>
            <div class="progress-btn" onclick="getResult()">查看报名进度</div>
        </div>
    </div>
    <div class="proress-txt-title"><span>报名情况</span></div>
    <div class="proress-txt-list">
        <div class="audit-results" style="display:none;">
            <img src="${s.base}/mobile/images/shtg.png">
        </div>
        <ul class="audit-results-info" style="display:none;">
            <li>姓名：<span id="name"></span></li>
            <li>性别：<span id="gender"></span></li>
            <li>身份证号：<span id="card-num"></span></li>
            <li>手机号：<span id="phonenum"></span></li>
            <li>审核意见：<span class="blue" id="result"></span></li>
        </ul>
        <div class="noproress">
            <img src="${s.base}/mobile/images/nodata.png"><br>
            <span>暂无查询结果</span>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="${s.base}/mobile/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/jquery-weui.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/fontSize.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/common.js"></script>
<script type="text/javascript">
    function getResult() {
        var cardnum = $("#input-card-num").val();
        if(cardnum == null || cardnum == ""){
            $.toast("身份证号码不能为空", "text");
            return;
        }

        var regCard = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/;
        if (!regCard.test(cardnum)) {
            $.toast("请输入正确的身份证号码", "text");
            return false;
        }

        $.fn.doPost('/phone/enrollment/getEnrollmentResult', {releaseId:'${releaseId}',card:cardnum}, function (result) {
            if (result.code === 0) {
                $(".noproress").hide();
                $(".audit-results").show();
                $(".audit-results-info").show();

                $("#name").html(result.data.name);
                $("#gender").html(result.data.sex);
                $("#card-num").html(result.data.card);
                $("#phonenum").html(result.data.phone);
                $("#result").html(result.data.reviewCmmt);

                if(result.data.reviewState == '1'){
                    $(".audit-results img").attr('src',"${s.base}/mobile/images/ddsh.png")
                }else if(result.data.reviewState == '2'){
                    $(".audit-results img").attr('src',"${s.base}/mobile/images/shtg.png")
                }else{
                    $(".audit-results img").attr('src',"${s.base}/mobile/images/shwtg.png")
                }

            } else {
                $.toast(result.msg,"text");
            }
        });

    }
</script>
</html>
